#ifndef TREVENT_H
#define TREVENT_H

#include <irrlicht.h>
#include "trGameProperty.h"
#include "trEventProfile.h"
#include "trEventType.h"

namespace tetra
{

class trEventNode;
class trGameObject;

typedef irr::core::array<trEventNode* > trEventNodeArray;
typedef irr::core::array<trGameProperty* > trGamePropertyArray;
typedef irr::core::array<trGameObject* > trGameObjectArray;
typedef irr::core::array<trGameObjectArray* > trGameObjectArrayGroup;//an array of arrays, but we
                                                                    //will call it a group array, or group of arrays
class trEvent : public irr::IReferenceCounted
{

    bool alive;

    trGamePropertyArray* property_array;

///@attention

    //consider changing to
    // trEventType trevent_type
    // design proposal in "trEventType.h"

    trEventType* trevent_type;
    //ETR_EVENT trevent_type;

    //trEventProfile* event_profile;

    trEventNodeArray* parent_event_nodes; //trEventNode instances that have this event in their cache

    irr::core::stringc name; //name of the event

public:

    //! Default constructor
    trEvent();

    //! Constructor
    trEvent( trEventType* new_type, const irr::core::stringc& new_name );

    //! Destructor
    ~trEvent();

    //! Returns enum type of event
    trEventType* getType() const;

    //! Returns event nodes that have this event in their cache
    trEventNodeArray* getParentEventNodes();

    //! Sets the event type
    void setType( trEventType* new_type );

    //! Set the name
    void setName( const irr::core::stringc& new_name );

    //! Toggles alive
    void toggleAlive();

    //! Sets alive
    void setAlive( bool new_state );

    virtual bool isAlive() const { return alive; };

    virtual irr::core::stringc getName() const { return name; };

    //operators


};

}; //end namespace tetra

#endif //TREVENT_H
